<%--
  Created by IntelliJ IDEA.
  User: 旷鸿宇
  Date: 2019/3/10
  Time: 9:36
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>Title</title>
        <script type="text/javascript" src="<%=basePath%>js/jquery-1.11.0.min.js"></script>

</head>
<body>
<%
    String id = request.getParameter("aaid");
%>
    <center>
        <form action="<%=basePath%>sys/gai2" method="post">
        <table>
            <tr>
                <td>
                    编号：
                </td>
                <td>
                    <input type="text"  name="id"  readonly="true" id="id">
                </td>
            </tr>
            <tr>
                <td>
                   姓名：
                </td>
                <td>
                    <input type="text"   name="name" id="name">
                </td>
            </tr>
            <tr>
                <td>
                    密码：
                </td>
                <td>
                    <input type="text"   name="pwd" id="pwd">
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" value="提交">
                </td>
            </tr>
        </table>
        </form>
        <input type="text" value="<%=id%>" id="iddd">
    </center>
    <script type="text/javascript">
        $(function () {

            $.ajax({
                url :"<%=basePath%>sys/gai",
                type:"POST",
                data:{id:<%=id%>},
                dataType :"",
                success: function (data) {

                    alert(data.id)
                   $("#id").attr("value",data.id)
                    $("#name").attr("value",data.name)
                    $("#pwd").attr("value",data.pwd)
                }
            });


        })

    </script>
</body>
</html>
